import PageRouter from './page'
import viewsRouter from './views'
import { createRouter, createWebHashHistory } from 'vue-router'

export const router = createRouter({
  history: createWebHashHistory(),
  routes: [...PageRouter, ...viewsRouter]
})


//全局前置守卫
router.beforeEach((to,form,next) => {
  console.log('to',to)
  next()
})

//全局后置守卫
router.afterEach((to,form) => {
  // console.log('to',to)
})

export default router;